<section class="action-bar">
  {{#if isEditing}}

    <div class="container action-bar__content">
      {{#if showApplyButton}}

        {{#if trackApplyEvent}}
          {{#track-ui-event category=trackApplyEvent.category action=trackApplyEvent.action
          name=trackApplyEvent.name as |metrics|}}
            <button
              class="nacho-button nacho-button--large-inverse action-bar__item"
              title={{applyButton.title}}
              onclick={{action metrics.trackOnAction (action "onApplyComplianceJson")}}
              disabled={{shouldDisableManualApply}}>
              Apply
            </button>
          {{/track-ui-event}}
        {{else}}
          <button
            class="nacho-button nacho-button--large-inverse action-bar__item"
            title={{applyButton.title}}
            onclick={{action "onApplyComplianceJson"}}
            disabled={{shouldDisableManualApply}}>
            Apply
          </button>
        {{/if}}

      {{else}}

        {{#if trackSaveEvent}}
          {{#track-ui-event category=trackSaveEvent.category action=trackSaveEvent.action
          name=trackSaveEvent.name as |metrics|}}
            <button
              class="nacho-button nacho-button--large-inverse action-bar__item"
              title="{{unless isDatasetFullyClassified
                              'Ensure you have provided a yes/no value for all dataset tags'
                              'Save'}}"
              onclick={{action metrics.trackOnAction (action "saveCompliance")}} disabled={{shouldDisableEditSaving}}>
              Save
            </button>
          {{/track-ui-event}}
        {{else}}
          <button
            class="nacho-button nacho-button--large-inverse action-bar__item"
            title="{{unless isDatasetFullyClassified
                            'Ensure you have provided a yes/no value for all dataset tags'
                            'Save'}}"
            onclick={{action "saveCompliance"}} disabled={{shouldDisableEditSaving}}>
            Save
          </button>
        {{/if}}

      {{/if}}

      {{#if trackCancelEvent}}
        {{#track-ui-event category=trackCancelEvent.category action=trackCancelEvent.action
        name=trackCancelEvent.name as |metrics|}}
          <button
            class="nacho-button nacho-button--large nacho-button--secondary action-bar__item"
            onclick={{action metrics.trackOnAction (action "onCancel")}}>
            Cancel
          </button>
        {{/track-ui-event}}
      {{else}}
        <button
          class="nacho-button nacho-button--large nacho-button--secondary action-bar__item"
          onclick={{action "onCancel"}}>
          Cancel
        </button>
      {{/if}}

      {{#if (and manualParseError (not hideManualParseErrors))}}
        <div class="action-bar__content__error-messages">
          {{fa-icon "times-circle-o"}}

          <span class="dataset-compliance-fields__manual-entry-errors">
            {{manualParseError}}
          </span>
        </div>
      {{/if}}
    </div>

  {{/if}}
</section>
